<?php
/**
 * Created by PhpStorm.
 * User: chen
 * Date: 2016/4/16
 * Time: 20:37
 */

use yii\widgets\LinkPager;
?>
<?php $this->beginBlock('css');?>
<link rel="stylesheet" type="text/css" href="<?=Yii::getAlias('@static')?>/pc/liketry/css/user.css">
<?php $this->endBlock();?>
<?= $this->render('@liketry/views/layouts/header_goods.php',['top_ad_show'=>false])?>
<!-- 主体内容 Start -->
<div class="usermain">
    <?= $this->render('@liketry/views/left/left.php') ; ?>
    <!--列表开始-->
    <div class="main-right user_PersonalZL">
        <h3>订单评论</h3>
        <div class="invite"><!--列表开始-->
            <div class="jywd">
                <ul class="wdjyBt">
                    <li><a href="<?=Yii::$app->urlManager->createUrl(Yii::$app->controller->id . '/show')?>" id="ddXxk_1" <?php if($type == 0){echo 'class="cur"';}?> >
                            全部评论<span class="Orange">（<?php echo intval($num['all']);?>）</span></a></li>
                    <li><a href="<?=Yii::$app->urlManager->createUrl([Yii::$app->controller->id . '/show' , 'is_perfect'=>1])?>" id="ddXxk_2" <?php if($type == 1){echo 'class="cur"';}?>  >
                            精华评论<span class="Orange"></span>（<?php echo intval($num['perfect']);?>）</a></li>
                    <li><a href="<?=Yii::$app->urlManager->createUrl([Yii::$app->controller->id . '/show' , 'is_reply'=>1])?>" id="ddXxk_3" <?php if($type == 2){echo 'class="cur"';}?>  >
                            客服回复<span class="Orange"></span>（<?php echo intval($num['reply']);?>）</a></li>
                </ul>
                <div class="wdpl">
                    <div id="ddXq_1">
                        <?php
                            if(!empty($data)){
                            foreach($data as $k=>$v){
                                //if(empty($v)) continue;
                        ?>
                            <div class="xdlb">
                                <?php if($v['status'] == 1){?>
                                    <div class="jinhua"></div>
                                <?php }?>
                                <div class="xdlb_Bt">
                                    <div class="xdlb_Bt_lf">
                                        <blockquote>
                                            <p><b><a href="<?=Yii::$app->urlManager->createUrl(['goodsdetail/index', 'product_id'=>$v['product_id']])?>"  target="_blank"><?= $v['goods_name']?></a></b>
                                            </p>
                                            <p><?= $v['content']?></p>

                                            <?php if(!empty($v['reply_content'])){?>
                                            <div class="kfhf">
                                                客服回复:<?= nl2br($v['reply_content']);?>
                                            </div>
                                            <?php }?>
                                        </blockquote>
                                    </div>
                                    <dl class="xdlb_Bt_lr">
                                        <dl>
                                            <?php for($i = 0; $i < 5; $i++) {
                                                if ($i < $v['level']) {
                                                    ?>
                                                    <dd>&nbsp;</dd>
                                                <?php } else {
                                                    ?>
                                                    <dd style="background-position: 20px -1px;">&nbsp;</dd>
                                                <?php }
                                            }
                                            ?>
                                            <dt> <span>状态:</span>
                                                <strong><?php echo in_array($v['status'], array(0,1))? '通过':'未通过'; ?></strong>
                                            </dt>
                                        </dl>
                                    </dl>
                                </div>
                                <ul>
                                    <ul>
                                        <?php if(isset($v["img"][0])){?><li><img src="<?php echo $v["img"][0];?>" alt="" width="100" height="100" /></li><?php }?>
                                        <?php if(isset($v["img"][1])){?><li><img src="<?php echo $v["img"][1];?>" alt="" width="100" height="100" /></li><?php }?>
                                        <?php if(isset($v["img"][2])){?><li><img src="<?php echo $v["img"][2];?>" alt="" width="100" height="100" /></li><?php }?>
                                        <?php if(isset($v["img"][3])){?><li><img src="<?php echo $v["img"][3];?>" alt="" width="100" height="100" /></li><?php }?>
                                    </ul>
                                </ul>
                                <div class="shij">
                                    <blockquote>
                                        <p><?php echo $v['create_time'];?></p>
                                    </blockquote>
                                </div>
                            </div>
                        <?php }}?>
                    </div>

                    <div class="lakai"> </div>
                    <div class="clear"></div>
                </div>
                <div class="page-wrap">
                    <?php echo LinkPager::widget([
                        'pagination' => $page,
                    ]);?>
                </div>
            </div>
        </div>
    </div>
<!--列表结束-->
</div>

<!--侧边栏-->
<?= $this->render('@liketry/views/layouts/sidebar.php')?>
<!--js-->
<?php $this->beginBlock('js');?>
<script src="<?=Yii::getAlias('@static')?>/pc/common/js/jquery-1.12.3.min.js"></script>
<script src="<?=Yii::getAlias('@static')?>/pc/common/js/lkt.pc.js"></script>
<?php $this->endBlock();?>


